<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动小练习</title>
    <style>
        .outer {
            width: 300px;
            background-color: gray;
            /*给了边框 不会抢走第一个孩子的margin-top*/
            border: 1px solid red;
        }

        .box {
            width: 100px;
            height: 100px;
            background-color: skyblue;
            border: 1px solid black;
            margin: 10px;
        }

        .box1 {
            height: 200px;
            float: left;
        }

        .box2 {
            float: left;
        }

        .box3 {
            float: left;
        }
    </style>
</head>
<body>
<div class="outer">
    <div class="box box1">盒子1</div>
    <div class="box box2">盒子2</div>
    <div class="box box3">盒子3</div>
</div>
</body>
</html>